<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.pojo.OUser,java.util.List"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd 

">
<%
	OUser user = (OUser) request.getAttribute("user");
	//String list = (String) request.getAttribute("list");
%>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人信息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="Assets/css/reset.css" />
<script type="text/javascript" src="Assets/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="Assets/js/js_z.js"></script>
<script
	src="<%=basePath%>bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="<%=basePath%>bower_components/jquery/dist/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="Assets/css/thems.css">

<script charset="utf-8" src="<%=basePath%>kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="<%=basePath%>kindeditor/lang/zh_CN.js"></script>
<link rel="stylesheet" href="<%=basePath%>kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="<%=basePath%>kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="<%=basePath%>kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript">
	var editor1;
	KindEditor.ready(function(K) {
		editor1 = K.create('textarea[name="content1"]', {
			cssPath : "kindeditor/plugins/code/prettify.css",
			uploadJson : 'kindeditor/jsp/upload_json.jsp',
			fileManagerJson : 'kindeditor/jsp/file_manager_json.jsp',
			allowFileManager : true,
			width:"100%",
			 afterCreate : function() {
				this.loadPlugin('autoheight');
			}, 
			 
			items : [ 'fullscreen', 'source', 'table', 'insertfile', 'link',
					'image', 'emoticons', '|', 'forecolor', 'hilitecolor',
					'bold', 'underline', 'removeformat', '|', 'justifyleft',
					'justifycenter', 'justifyright', 'preview' ]
			
		});
		
		 
	});
</script>
<script type="text/javascript">

/*  window.onload=function(){
    var oIpt = document.getElementsByTagName('input')
    oIpt[0].onclick=function(){
        this.value = ""
    }
} */
 function chongzhi(){
	var url="xjchongzhi.html";
	var c={};
	var epoint = document.getElementById("epoint").value;
	c.epoint=epoint;
	c.img=editor1.html();
	$.ajax({
		type : 'post',
		url : url,
		data : c,
		success : function(data) {
			console.log(data);
			alert("您的充值申请已提交，请等待管理员确认后才能到账");
		}
	});
} 
 
 function chakan(id){
	 <%-- var list=<%=list%>
	 console.log(list); --%>
	 var s1 = id;
		var info = {UserID : ""};
		info.UserID = s1;	
		//alert(s1);
		$.ajax({
			type : 'post',
			url : 'chakan.html',
			data : info,
			success : function(list) {
				var res = JSON.parse(list);
				var html=""
				//console.log(list)
				console.log(list.length)
				 for (var i in res){
					//var dt = new Date(res[i].createdate);
					 
					//var time= dt.toLocaleDateString("yyyy-MM-dd hh:mm:ss");
					html += '<tr><td>' +res[i].createdate  + '</td><td>'
					+ res[i].amount+ '</td><td>'
					+ res[i].balance + '</td></tr>';
		          } 
		      $('#mingxi').html(html);
			}
		});
 }
 
 
</script>
</head>
<body>
	<%
		
	%>
	<div class="h_top">
		<div class="h_top_m">
			欢迎来到商品交易大厅网 <span> 欢迎回来会员<%=user.getUserID()%> <a
				href="logout.html?">安全退出</a>
			</span>
		</div>
	</div>
	<!--顶部-->
	<!--头部-->
	<div class="header clearfix">
		<div class="logo">
			<a href="<%=basePath%>index.html"><img src="Assets/images/logo.png" alt="网" /></a>
		</div>
		<div class="tel">
			<!--img src="Assets/images/tel.png" alt="400-168-0000"-->
		</div>
	</div>
	<div class="nav_bg">
		<ul class="nav clearfix">
			<li ><a href="main.html">首页</a></li>
			<li><a href="bypt.html">商品交易</a></li>
			<li class="now"><a href="member.html">我的账户</a></li>
		</ul>
	</div>
	<div class="space_hx">&nbsp;</div>
	<div class="second clearfix">
		<div class="scd_l">
			<ul class="sidenav">

				<li ><a href="member.html">个人信息</a></li>
				<li><a href="selectwtdprice.html?goods=宝石">商品挂单</a></li>
				<li><a href="selllist.html?page=1&last=5">售出记录</a></li>
				<li><a href="buylist.html?page=1&last=5">购买记录</a></li>
				<li><a href="gr_money.html?page=1&last=5">交易明细</a></li>
				<li><a href="tixian.html">提现明细</a></li>
				<li class="now"><a href="chongzhi.html">充值明细</a></li>
				<!-- <li><a href="tiqu.html">钱包管理</a></li> -->

			</ul>
			<div class="space_hx">&nbsp;</div>
		</div>
		<div class="scd_r">
			<div class="ucenter">
				<div class="box">
					<div class="box_h">
						<img src="Assets/images/icon10.png" alt="" /> <span class="red">个人账户</span>
					</div>
					<div class="box_m">
						<ul class="grxx">
							<%-- <li class="clearfix"><span class="title">会员编号*</span>
								<div class="li_r">
									<%=user.getUserID()%>
								</div></li>
							<li class="clearfix "><span class="title">积分*</span>
								<div class="li_r lijifen">
									<%=user.getEncash().toString()%>
								</div>
								<div class="li_r">分</div></li> --%>
							<form name="myform" action="?action=S" method="post"
								onSubmit="return CheckForm();">
								<table width="100%" border="0">

									
									<!-- <center>
										
									</center> -->
									<tr>
									<td>会员编号</td>
									<td><%=user.getUserID()%></td>
									</tr>
									<tr>
									<td>积分</td>
									<td><%=user.getEncash().toString()%></td>			
									</tr>
									<tr>
									<td>支付方式</td>
									<td><img src="Assets/images/erweima.jpg" height="200" width="200"></td>
									<td><img src="img/bankpay.jpg" height="200" width="200"></td>
									</tr>
									<!-- <tr>
									<td></td>
									<td><img src="Assets/images/erweima.jpg" height="200" width="200"></td>
									</tr> -->
									<tr>
										<td>充值金额</td>
										
										<td><input class="form-control" type="text" name="epoint"
											id="epoint"></br>(请扫码支付后填入相应的数额，并提供充值凭证，点击确认)</td>
									</tr>
									<tr>
									<td>充值凭证</td>
									<td colspan="2"><textarea name="content1"  rows="4"></textarea></td>
									</tr>
									<tr>
										<td></td>
										<td><input type="button" onclick="chongzhi()"
											value="确认充值"> 
											<input id="<%=user.getUserID()%>" type="button" onclick="chakan(this.id)" value="查看" /></td>
									</tr>
								</table>
							</form>
							<table class="table table-striped table-bordered td-center"
					id="data-lists">
					<thead>
						<tr>
							<th>时间</th>
							<th>充值金额</th>
							<th>余额</th>
							
						
						</tr>
					</thead>
					<tbody id="mingxi">

					</tbody>
				</table>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="space_hx">&nbsp;</div>
	<div class="space_hx">&nbsp;</div>
	<div class="f_nav_bg">
		<dl class="f_nav clearfix">
			<dt>
				<img src="Assets/images/tel.png" />
			</dt>
			<dd>
				<div class="tip" style="float: left; width: 200px;">
					<span style="font-size: 16px;">团队</span>
					<li>太原金属企业站</li>
					<li>太原金属商城</li>
					<li>太原金属会员网</li>
				</div>

				<div class="tip" style="float: left; width: 200px;">
					<span style="font-size: 16px;">服务帮助</span>

					<li><a href="news.html?classid=4">为什么选择我们</a></li>

					<li><a href="news.html?classid=3">网站声明</a></li>

					<li><a href="news.html?classid=2">公司公告</a></li>

					<li><a href="news.html?classid=1">行业动态</a></li>
				</div>
				<div class="tip">
					<p>交易大厅</p>
					<p>&nbsp;</p>
				</div>
			</dd>
		</dl>
		<div class="copyriht">版权解释权归太原金属所有</div>
	</div>

</body>
</html>
